package com.xingkeduo.business.order.remote.feign;

import com.xingkeduo.dto.*;
import com.xingkeduo.dto.param.ActivityCombinationParam;
import com.xingkeduo.utils.ResponseUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "business-marketing", fallback = MarketingFeignServiceImpl.class)
public interface MarketingFeignService {


    /**
     * 查询最优活动卡券信息
     * @param param
     * @return
     */
    @PostMapping("/mk/api/discount/package/getRecommendedPackage")
    ResponseUtils<MarketActivityDto> getRecommendedPackage(@RequestBody  ActivityCombinationParam param);

    /**
     * 查询门店内多个发型师活动详情
     * @param storeId
     * @param hairStyleIds
     * @return
     */
    @RequestMapping("/mk/api/activity/store/getBatchHairdresserActivity")
    ResponseUtils<List<ActivityApiResponseVo>> getBatchHairdresserActivity(@RequestParam("storeId") Long storeId,@RequestParam("hairStyleIds") String hairStyleIds);


    /**
     * 判定活动id与权益id是否同享
     * @param param
     * @return
     */
    @PostMapping("/mk/api/discount/package/checkUserActivity")
    ResponseUtils<MarketActivityDto> checkUserActivity(@RequestBody ActivityUseParam param);


    /**
     * 查询预定时间段的分流活动
     * @param param
     * @return
     */
    @RequestMapping("/mk/api/discount/package/getStoreBypassFlowActivityDetail")
    ResponseUtils<MarketActivityDto> getStoreBypassFlowActivityDetail(@RequestBody ActivityParam param);


    /**
     * 退卡 退券
     * @param
     * @return
     */
    @PostMapping("/mk/api/use/refundOrder")
    ResponseUtils refundOrder(@RequestBody ActivityUseParam activityUseParam);


    /**
     * 支付成功修改用户券，卡状态
     * @param activityUseParam
     * @return
     */
    @PostMapping("/mk/api/use/placeOrder")
    ResponseUtils placeOrder(@RequestBody ActivityUseParam activityUseParam);


    /**
     * 补偿优惠券 废弃
     * @param userId
     * @param marketingId
     * @return
     */
    @RequestMapping("/mk/api/provide/bindReceiveAccount")
    ResponseUtils<ReceiveAccount> bindReceiveAccount(@RequestParam("userId") String userId, @RequestParam("marketingId") String marketingId);

    /**
     * 补偿优惠券
     * @param userId
     * @param
     * @return
     */
    @RequestMapping("/mk/api/provide/bindCompensationReceiveAccount")
    ResponseUtils<ReceiveAccount> bindCompensationReceiveAccount(@RequestParam("userId") String userId);

    /**
     * Barber下单补偿优惠券
     * @param userId
     * @param
     * @return
     */
    @RequestMapping("/mk/api/provide/bindBarberReceiveAccount")
    ResponseUtils<ReceiveAccount> bindBarberReceiveAccount(@RequestParam("userId") Long userId,@RequestParam("hairType") String hairType);

}
